<include file="Public/frame-header" />
</head>
<body class="J_scroll_fixed" style="min-width:800px;">
<div class="wrap J_check_wrap">
	<ul class="nav nav-tabs">
	   <li class="active"><a href="{:U('/Admin/Coupon/index')}">优惠券列表</a></li>
	   <li class=""><a href="{:U('/Admin/Coupon/add')}">添加优惠券</a></li>
	</ul>
	<form class="well form-search" method="get" action="{:U('/Admin/Coupon/index')}">
		<div class="search_type cc mb10">
			<div class="mb10">
				<span class="mr20">分类： 
					优惠券： <input type="text" name="key" value="" style="width: 200px;" placeholder="优惠券"> &nbsp;&nbsp;
					<input type="submit" class="btn btn-primary" value="搜索">
				</span>
			</div>
		</div>
	</form>
	<form class="J_ajaxForm" action="" method="post">
<!-- 		<div class="table-actions"> -->
<!-- 			<button class="btn btn-primary btn-small J_ajax_submit_btn" type="submit"  -->
<!-- 			data-action="{:U('/Admin/Coupon/ban')}" data-subcheck="true" data-msg="你确定停用吗？">停用</button> -->
<!-- 			<button class="btn btn-primary btn-small J_ajax_submit_btn" type="submit"  -->
<!-- 			data-action="{:U('/Admin/Coupon/cancelban')}" data-subcheck="true" data-msg="你确定启用吗？">启用</button> -->
<!-- 		</div> -->
		<table class="table table-hover table-bordered table-list">
			<thead>
				<tr>
<!-- 					<th width="15"><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x"></label></th> -->
					<th>编号</th>
					<th>优惠券名称</th>
					<th>使用条件</th>
					<th>优惠金额</th>
					<th>生效时间</th>
					<th>过期时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<foreach name="list" item="item">
			<tr>
<!-- 				<td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="{$item.c_id}" ></td> -->
				<td>{$item.c_id}</td>
					<td>{$item.title}</td>
					<td>
						<if condition="$item['c_type'] eq 1">
							{$item.money_max}
						</if>
					</td>
					<td>
						<if condition="$item['c_type'] eq 1">
							{$item.money_reduce}
						<else />
							{$item.money_amount}
						</if>
					</td>
					<td>{$item.addtime|date="Y-m-d H:i:s",###}</td>
					<td>
						<eq name="item.expiry_type" value="1">
						不过期
						</eq>
						<eq name="item.expiry_type" value="2">
						{$item.expiry|date="Y-m-d H:i:s",###}
						</eq>
						<eq name="item.expiry_type" value="3">
						{$item.expiry}天后过期
						</eq>
					</td>
					<td><if condition="$item['is_active'] eq 1">启用<else/>停用</if></td>
					<td >
						<a href="{:U('/Admin/Coupon/edit/id/'.$item['c_id'])}">修改</a>
						<if condition="$item['is_active'] eq 1">
						<a href="{:U('/Admin/Coupon/ban/id/'.$item['c_id'])}">停用</a>
						<else/>
						<a href="{:U('/Admin/Coupon/cancelban/id/'.$item['c_id'])}">启用</a>
						</if>
						<a href="{:U('/Admin/Coupon/userCoupon/coupon_id/'.$item['c_id'])}">领取记录</a>
					</td>
			</tr>
			</foreach>
			<tfoot>
				<tr>
<!-- 					<th width="15"><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x"></label></th> -->
					<th>编号</th>
					<th>优惠券名称</th>
					<th>使用条件</th>
					<th>优惠金额</th>
					<th>生效时间</th>
					<th>过期时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</tfoot>
		</table>
<!-- 		<div class="table-actions"> -->
<!-- 			<button class="btn btn-primary btn-small J_ajax_submit_btn" type="submit"  -->
<!-- 			data-action="{:U('/Admin/Coupon/ban')}" data-subcheck="true" data-msg="你确定停用吗？">停用</button> -->
<!-- 			<button class="btn btn-primary btn-small J_ajax_submit_btn" type="submit"  -->
<!-- 			data-action="{:U('/Admin/Coupon/cancelban')}" data-subcheck="true" data-msg="你确定启用吗？">启用</button> -->
<!-- 		</div> -->
		<div class="pagination">{$Page}</div>
	</form>
	<script src="__ADMIN__/statics/js/common.js"></script>
</body>
</html>